package com.ljf.daily.consumptiondetail.dto.command;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ljf.common.validation.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 日常消费明细--新增修改  daily_dat_consumption_detail
 *
 * @author LJF
 * @since 2024-01-30
 */
@Data
@ApiModel("日常消费明细--新增修改")
public class DailyDatConsumptionDetailCommand implements Serializable {

    @JsonProperty("id")
    @ApiModelProperty(value = "ID")
    @NotNull(message = "ID不能为空", groups = UpdateGroup.class)
    private Long id;

    @JsonProperty("dayBalance")
    @ApiModelProperty(value = "当天结余")
    @Digits(integer = 6, fraction = 2, message = "当天结余最多只允许6位整数2位小数")
    private BigDecimal dayBalance;

    @JsonProperty("totalBalance")
    @ApiModelProperty(value = "总结余")
    @Digits(integer = 6, fraction = 2, message = "总结余最多只允许6位整数2位小数")
    private BigDecimal totalBalance;

    @JsonProperty("allocationAmount")
    @ApiModelProperty(value = "分配金额")
    @Length(message = "分配金额不能超过20个字符", max = 20)
    private String allocationAmount;

    @JsonProperty("remark")
    @ApiModelProperty(value = "备注")
    @Length(message = "备注不能超过50个字符", max = 50)
    private String remark;

    @JsonProperty("dayConsumption")
    @ApiModelProperty(value = "当天消费")
    private String dayConsumption;

}
